/**
 * @author Allan
 * @belong to 上海初阳信息科技有限公司
 * @date:2016-5-18 上午8:55:10
 * @version :
 * 
 */

package org.keyyond.ms.core.util;

import java.io.PrintWriter;  
import java.io.StringWriter;  
  
public class StringPrintWriter extends PrintWriter{  
  
    public StringPrintWriter(){  
        super(new StringWriter());  
    }  
     
    public StringPrintWriter(int initialSize) {  
          super(new StringWriter(initialSize));  
    }  
     
    public String getString() {  
          flush();  
          return ((StringWriter) this.out).toString();  
    }  
     
    @Override  
    public String toString() {  
        return getString();  
    }  
}